#!/bin/bash

# Exercise 2
# Author: Michael Joergler
# Date: 6.10.2013
# Version: 1.0

CPUCOUNT=$(cat /proc/cpuinfo | grep processor | wc -l)
echo "Number of processors on this machine: "$CPUCOUNT

PROCCOUNT=$(ps -A | wc -l)
echo "Number of processes running: "$PROCCOUNT

PORTCOUNT=$(sudo netstat -lp --inet | wc -l)
echo "Number of open ports: "$PORTCOUNT